<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title>美多商城-注册</title>
	<link rel="stylesheet" type="text/css" href="{{ static('css/reset.css') }}">
	<link rel="stylesheet" type="text/css" href="{{ static('css/main.css') }}">
    <script type="text/javascript" src="{{ static('js/vue-2.5.16.js') }}"></script>
    <script type="text/javascript" src="{{ static('js/axios-0.18.0.min.js') }}"></script>
</head>
<body>
    <div id="register">
        <div class="register_con">
            <div class="l_con fl">
                <a href="{{ static('index.html') }}" class="reg_logo"><img src={{ static('images/logo.png') }}></a>
                <div class="reg_slogan">商品美 · 种类多 · 欢迎光临</div>
                <div class="reg_banner"></div>
            </div>
            <div class="r_con fr">
                <div class="reg_title clearfix">
                    <h1>用户注册</h1>
                    <a href="{{ url('users:login') }}">登录</a>
                </div>
                <div class="reg_form clearfix">
                    <form method="post" class="register_form" @submit="on_submit" v-cloak>
                        {{ csrf_input }}
                        <ul>
                            <li>
                                <label>用户名:</label>
                                <input type="text" v-model="username" @blur="check_username" name="username" id="user_name">
                                <span class="error_tip" v-show="error_name">[[ error_name_message ]]</span>
                            </li>
                            <li>
                                <label>密码:</label>
                                <input type="password" v-model="password" @blur="check_password" name="password" id="pwd">
                                <span class="error_tip" v-show="error_password">请输入8-20位的密码</span>
                            </li>
                            <li>
                                <label>确认密码:</label>
                                <input type="password" v-model="password2" @blur="check_password2" name="password2" id="cpwd">
                                <span class="error_tip" v-show="error_password2">两次输入的密码不一致</span>
                            </li>
                            <li>
                                <label>手机号:</label>
                                <input type="text" v-model="mobile" @blur="check_mobile" name="mobile" id="phone">
                                <span class="error_tip" v-show="error_mobile">[[ error_mobile_message ]]</span>
                            </li>
                            <li>
                                <label>图形验证码:</label>
                                <input type="text" name="image_code" v-model="code_img" @blur="check_code_img" id="pic_code" class="msg_input">
                                <img :src="code_img_url+img_count" @click="get_code_img" alt="图形验证码" class="pic_code">
                                {# :src 自动用网址发送get请求获取图片 只有当网址改变时才会再次发送请求 #}
                                <span class="error_tip" v-show="error_code_img">[[ error_code_img_msg ]]</span>
                            </li>
                            <li>
                                <label>短信验证码:</label>
                                <input type="text" name="sms_code" v-model="code_sms" @blur="check_code_sms" id="msg_code" class="msg_input">
                                <a class="get_msg_code" @click="get_code_sms">[[ send_sms ]]</a>
                                <span class="error_tip" v-show="error_code_sms">[[ error_code_sms_msg ]]</span>
                                {% if code_sms_error %}
                                <span>{{ code_sms_error }}</span>
                                {% endif %}
                            </li>
                            <li class="agreement">
                                <input type="checkbox" v-model="allow" @blur="check_allow" name="allow" id="allow">
                                <label>同意”美多商城用户使用协议“</label>
                                <span class="error_tip" v-show="error_allow">请勾选用户协议</span>
                            </li>
                            <li class="reg_sub">
                                {% if error %}
                                    <span class="error_tip">{{ error }}</span>
                                {% endif %}
                                <input type="submit" value="注 册">
                            </li>
                        </ul>
                    </form>
                </div>
            </div>
        </div>
        <div class="footer no-mp">
            <div class="foot_link">
                <a href="#">关于我们</a>
                <span>|</span>
                <a href="#">联系我们</a>
                <span>|</span>
                <a href="#">招聘人才</a>
                <span>|</span>
                <a href="#">友情链接</a>
            </div>
            <p>CopyRight © 2016 北京美多商业股份有限公司 All Rights Reserved</p>
            <p>电话：010-****888    京ICP备*******8号</p>
        </div>
    </div>
</body>
{# 此项必须放后面 #}
<script type="text/javascript" src="{{ static('js/common.js') }}"></script>
<script type="text/javascript" src="{{ static('js/register.js') }}"></script>

</html>